<!DOCTYPE html>
<html>
    {include file="Widgets/head" /}
    <style>
        img{width: 200px}
        span{color: #cc181b}
    </style>
    <body class="gray-bg">
        <div class="wrapper wrapper-content animated fadeInUp ibox-content">
            <form action="" method="">
                <div class="row">
                    <div class="col-sm-12 ">
                        <div class="ibox-title">
                            <h3>企业借款人-详情</h3>
                        </div>
                    </div>
                </div>
                <ul id="myTab" class="nav nav-tabs">
                    <li class="active"><a href="#home1" data-toggle="tab">基本信息</a></li>
                    <li><a href="#home2" data-toggle="tab">法人信息</a></li>
                    <li><a href="#home3" data-toggle="tab">银行卡信息</a></li>
                    <li><a href="#home4" data-toggle="tab">借款信息</a></li>
                    <li><a href="#home5" data-toggle="tab">其他信息</a></li>
                </ul>
                <div id="myTabContent" class="tab-content">
                    <div class="tab-pane fade in active" style="padding-top: 20px" id="home1">
                        <div class="row">
                            <div class="col-sm-2 text-right">企业名称：</div>
                            <div class="col-sm-10">{$company['company_name']}</div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="row">
                            <div class="col-sm-2 text-right">企业网址：</div>
                            <div class="col-sm-10">{$company['website']}</div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="row">
                            <div class="col-sm-2 text-right">企业地址：</div>
                            <div class="col-sm-10">{$company['address']}</div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="row">
                            <div class="col-sm-2 text-right">企业简介：</div>
                            <div class="col-sm-10">{$company['summary']}</div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="row">
                            <div class="col-sm-2 text-right">营业范围：</div>
                            <div class="col-sm-10">{$company['business_scope']}</div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="row">
                            <div class="col-sm-2 text-right">组织机构代码：</div>
                            <div class="col-sm-10">{$company['organization_no']}</div>
                        </div>
                        <div class="row">
                            <div class="col-sm-2 text-right">营业执照号：</div>
                            <div class="col-sm-10">{$company['license_no']}</div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="row">
                            <div class="col-sm-2 text-right">营业执照有效期：</div>
                            <div class="col-sm-10">{$company['license_expire_date']}</div>
                        </div>
                        <div class="row">
                            <div class="col-sm-2 text-right">营业执照所在地：</div>
                            <div class="col-sm-10">{$company['license_address']}</div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="row">
                            <div class="col-sm-2"> </div>
                            <?php $file_name = date('Y-m-d',strtotime($company['create_time']));   ?>
                            <div class="col-sm-2">
                                <img width="200px" src="/uploads/company/<?php echo $file_name.'/'.$company['user_id'].'/yyzz.jpg'; ?>">
                            </div>
                            <div class="col-sm-2">
                                <img width="200px" src="/uploads/company/<?php echo $file_name.'/'.$company['user_id'].'/zzjgz.jpg'; ?>">
                            </div>
                            <div class="col-sm-2">
                                <img width="200px" src="/uploads/company/<?php echo $file_name.'/'.$company['user_id'].'/swdjz.jpg'; ?>">
                            </div>
                        </div>
                    </div>
                    
                    <div class="tab-pane fade in active" id="home2">
                        <div class="row">
                            <div class="col-sm-2 text-right">企业法人：</div>
                            <div class="col-sm-10">{$company['legal_person']}</div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="row">
                            <div class="col-sm-2 text-right">法人手机号码：</div>
                            <div class="col-sm-10">{$company['legal_person_phone']}</div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="row">
                            <div class="col-sm-2 text-right">法人身份证号码：</div>
                            <div class="col-sm-10">{$company['cert_no']}</div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="row">
                            <div class="col-sm-2 text-right">图片信息：</div>
                            <div class="col-md-4">
                                <img width="200px" src="/uploads/company/<?php echo $file_name.'/'.$company['user_id'].'/frzjz.jpg'; ?>">
                                <span class="help-block m-b-none"></span>
                            </div>
                            <div class="col-md-4">
                                <img width="200px" src="/uploads/company/<?php echo $file_name.'/'.$company['user_id'].'/frzjf.jpg'; ?>">
                                <span class="help-block m-b-none"></span>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="row">
                            <div class="col-sm-2 text-right">联系电话：</div>
                            <div class="col-sm-10">{$company['telephone']}</div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="row">
                            <div class="col-sm-2 text-right">联系Email：</div>
                            <div class="col-sm-10">{$company['email']}</div>
                        </div>
                    </div>
                    
                    <div class="tab-pane fade in active" style="padding-top: 20px" id="home3">
                        <div class="row">
                            <div class="col-sm-2 text-right">开户银行：</div>
                            <div class="col-sm-10">{$company['bank_code']}</div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="row">
                            <div class="col-sm-2 text-right">开户卡号：</div>
                            <div class="col-sm-10">{$company['bank_account_no']}</div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="row">
                            <div class="col-sm-2 text-right">开户省市：</div>
                            <div class="col-sm-10">{$company['province']}{$company['city']}</div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="row">
                            <div class="col-sm-2 text-right">开户支行名称：</div>
                            <div class="col-sm-10">{$company['bank_branch']}</div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="row">
                            <div class="col-sm-offset-2 col-md-4">
                                <img width="200px" src="/uploads/company/<?php echo $file_name.'/'.$company['user_id'].'/jsxkz.jpg'; ?>">
                                <span class="help-block m-b-none"></span>
                            </div>
                        </div>
                    </div>
                                     
                    <div class="tab-pane fade in"  style="padding-top: 20px" id="home4">
                        <div class="row">
                            <div class="col-sm-12">
                                <table class="table table-bordered">
                                    <thead>
                                        <tr>
                                            <th>批次号</th>
                                            <th>借款金额</th>
                                            <th>借款期限（天）</th>
                                            <th>剩余期限（天）</th>
                                            <th>还款来源</th>
                                            <th>资金用途</th>
                                            <th>实际放款金额</th>
                                            <th>还款方式</th>
                                            <th>应还本息</th>
                                            <th>已还金额</th>
                                            <th>剩余应还金额</th>
                                            <th>关联资产</th>
                                            <th>状态</th>
                                            <th>还款时间</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td>{$pool['batch_number']}</td>
                                            <td>{$pool['money']}</td>
                                            <td>{$pool['duration_all']}</td>
                                            <td>{$pool['left_duration']}</td>
                                            <td>{$pool['repayment_source']}</td>
                                            <td>{$pool['money_use_for']}</td>
                                            <td>{$pool['amount']}</td>
                                            <td>{$pool['repayment_type']}</td>
                                            <td>
                                                {if (in_array($pool['status'], [2, 3]))}
                                                    {$pool['pay_money']}
                                                {/if}
                                            </td>
                                            <td>
                                                {if (in_array($pool['status'], [2, 3]))}
                                                    {$pool['payed']}
                                                {/if}
                                            </td>
                                            <td>
                                                {if (in_array($pool['status'], [2, 3]))}
                                                    {$pool['need_pay']}
                                                {/if}
                                            </td>
                                            <td>{$pool['code']}</td>
                                            <td>{$pool['status_name']}</td>
                                            <td>
                                                {if (strtotime($pool['reply_time']))}
                                                {$pool['reply_time']}
                                                {/if}
                                            </td>
                                            <td>
                                                {if (in_array($pool['status'], [2, 3]))}
                                                    <a href="{:url('Management/investDetail',['id'=>$pool['id']])}" class="btn btn-info">投资明细</a>
                                                {/if}
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                                        
                    <div class="tab-pane fade in" style="padding-top: 20px" id="home5">
                        {if (isset($files))}
                        <div class="row">
                            <div class="col-sm-2 text-right">电子资料附件：</div>
                            <div class="col-sm-10">
                                {foreach $files as $val} 
                                    <a href="{$val['url']}" download="{$val['title']}">{$val['title']}</a>
                                    <br />
                                {/foreach}
                            </div>
                        </div>
                        {/if}
                    </div>
                </div>
                <div class="row text-center">
                    <a href="javascript:void(0);" onclick="window.history.back()">
                        <button class="btn btn-primary" type="button">返回</button>
                    </a>
                </div>
            </form>
        </div>
    </body>
</html>